open(BUFF,"combined_GBM_normal_final.tped");
#$line=<BUFF>;
while($line=<BUFF>)
{
	chomp($line);
	@array = split(/ /,$line);
	$rs{$array[1]} = $array[0]." ".$array[1]." ".$array[2]." ".$array[3];
}
open(BUFF,"outfile_result");
open(WRBUFF,">outfile_result_snp_loc");
$line=<BUFF>;
print WRBUFF "SNP\tCHR\tBP\tP\n";
while($line=<BUFF>)
{
        chomp($line);
        @array = split(/\t/,$line);
        if(exists($rs{$array[1]}))
	{
		@array1 = split(/ /,$rs{$array[1]});
		print WRBUFF $array[1]."\t".$array1[0]."\t".$array1[3]."\t".$array[9]."\n";
	}
	else
	{
		die "$array[1]\n";
	}
}

